<template>
	<view style="margin-top: 12rpx;">
		<u-top-tips ref="uTips"></u-top-tips>
		<u-form :model="form" ref="uForm" style="background-color: #fff;">
				<u-form-item >
					<u-input v-model="form.url" />
					</u-form-item>
			</u-form>
			<u-button style="width: 80%;margin-top: 20rpx;" @click="setPlaySource()">提交</u-button>
	</view>
</template>

<script>
	import {
		siteUrls
	} from "../../utils/api.js"
	export default {
		data() {
			return {
				siteUrls: '',
				form:{
					url:''
				}
			}
		},
		onLoad() {
			var that = this;
			that.form.url = uni.getStorageSync('url') || siteUrls[0].url
		},
		methods: {
			setPlaySource() {
				uni.setStorageSync('url', this.form.url)
				this.$refs.uTips.show({
					title: '设置成功，请返回首页下拉刷新',
					type: 'success',
					duration: '2300'
				})
			},

		}
	}
</script>

<style lang="scss">
	page {
		background-color: #ededed;
	}
	

</style>